package com.zheng.api.common.constant;

import com.zheng.common.base.BaseConstants;

/**
 * api系统常量类
 * Created by shuzheng on 2017/2/19.
 */
public class ApiConstant extends BaseConstants {
    //微信小程序用户相关缓存储存路径
    public static final String WECHATAPP_LOGIN_USER_INFO = "WECHATAPP_LOGIN_USER_INFO";
    public static final String WECHATAPP_LOGIN_USER_TOKEN = "WECHATAPP_LOGIN_USER_TOKEN";

    //验证码缓存储存路径
    public static final String CAPTCH_RANDOM_CODE = "CAPTCH_RANDOM_CODE";
    public static final String CAPTCH_RANDOM_CODE_CODE = "CODE";
    public static final String CAPTCH_RANDOM_CODE_COUNT = "COUNT";

    //伞机端相关缓存储存路径
    public static final String UMBRELLA_MACHINE_LOGIN_USER_INFO = "UMBRELLA_MACHINE_LOGIN_USER_INFO";
    public static final String UMBRELLA_MACHINE_LOGIN_USER_TOKEN = "UMBRELLA_MACHINE_LOGIN_USER_TOKEN";
    public static final String UMBRELLA_MACHINE_BORROW_SECONDFALG = "UMBRELLA_MACHINE_BORROW_SECONDFALG";


    /**
     * 伞机端通信指令
     */
    public static final String UMBRELLA_MACHINE_COMMAND_10001="10001"; //签到返回
    public static final String UMBRELLA_MACHINE_COMMAND_20001="20001"; //设备签到
    public static final String UMBRELLA_MACHINE_COMMAND_10002="10002"; //设备上报状态返回
    public static final String UMBRELLA_MACHINE_COMMAND_20002="20002"; //设备状态上报
    public static final String UMBRELLA_MACHINE_COMMAND_10003="10003"; //重启指令下发
    public static final String UMBRELLA_MACHINE_COMMAND_20003="20003"; //重启结果上报
    public static final String UMBRELLA_MACHINE_COMMAND_10004="10004"; //返回通讯失败
    public static final String UMBRELLA_MACHINE_COMMAND_20004="20004"; //伞机MQ通信连接失败

    public static final String UMBRELLA_MACHINE_COMMAND_10101="10101"; //扫码借伞下发
    public static final String UMBRELLA_MACHINE_COMMAND_20101="20101"; //扫码借伞-雨伞识别结果上报
    public static final String UMBRELLA_MACHINE_COMMAND_10102="10102"; //出伞指令下发
    public static final String UMBRELLA_MACHINE_COMMAND_20102="20102"; //扫码借伞-出伞结果上报
    public static final String UMBRELLA_MACHINE_COMMAND_10105="10105"; //扫码还伞下发
    public static final String UMBRELLA_MACHINE_COMMAND_20105="20105"; //扫码还伞-还伞结果上报
    public static final String UMBRELLA_MACHINE_COMMAND_10106="10106";
    public static final String UMBRELLA_MACHINE_COMMAND_20106="20106"; //物理还伞-还伞识别上报(二次交互模式)
    public static final String UMBRELLA_MACHINE_COMMAND_10107="10107"; //物理还伞-下发开锁指令(二次交互模式)
    public static final String UMBRELLA_MACHINE_COMMAND_20107="20107"; //物理还伞-还伞结果上报(二次交互模式)
    public static final String UMBRELLA_MACHINE_COMMAND_20108="20108"; //物理还伞(一次交互模式）
    public static final String UMBRELLA_MACHINE_COMMAND_10110="10110"; //进伞指令
    public static final String UMBRELLA_MACHINE_COMMAND_20110="20110"; //雨伞管理-进伞结果上报
    public static final String UMBRELLA_MACHINE_COMMAND_10111="10111"; //结束进伞
    public static final String UMBRELLA_MACHINE_COMMAND_20111="20111";
    public static final String UMBRELLA_MACHINE_COMMAND_10112="10112"; //出伞指令
    public static final String UMBRELLA_MACHINE_COMMAND_20112="20112"; //雨伞管理-出伞结果上报
    public static final String UMBRELLA_MACHINE_COMMAND_10113="10113"; //结束出伞
    public static final String UMBRELLA_MACHINE_COMMAND_20113="20113";
    public static final String UMBRELLA_MACHINE_COMMAND_20999="20999";//客户端反馈指令不正确
    public static final String UMBRELLA_MACHINE_COMMAND_10999="10999";//服务端反馈指令不正确
    public static final String UMBRELLA_MACHINE_COMMAND_20998="20998";//客户端心跳
    public static final String UMBRELLA_MACHINE_COMMAND_10998="10998";//服务端心跳

    /**
     * 小程序端通信指令
     */
    public static final String UMBRELLA_WECHATAPP_COMMAND_30101="30101";// 借伞识别雨伞结果上报
    public static final String UMBRELLA_WECHATAPP_COMMAND_30201="30201";
    public static final String UMBRELLA_WECHATAPP_COMMAND_30301="30301";
    public static final String UMBRELLA_WECHATAPP_COMMAND_30401="30401";
    public static final String UMBRELLA_WECHATAPP_COMMAND_30501="30501";
    public static final String UMBRELLA_WECHATAPP_COMMAND_30601="30601";
    public static final String UMBRELLA_WECHATAPP_COMMAND_30701="30701";

    public static final String UMBRELLA_WECHATAPP_COMMAND_40101="40101"; // 扫码借伞指令
    public static final String UMBRELLA_WECHATAPP_COMMAND_40201="40201";// 扫码还伞指令
    public static final String UMBRELLA_WECHATAPP_COMMAND_40301="40301";
    public static final String UMBRELLA_WECHATAPP_COMMAND_40401="40401";
    public static final String UMBRELLA_WECHATAPP_COMMAND_40501="40501";
    public static final String UMBRELLA_WECHATAPP_COMMAND_40601="40601"; // 扫码进伞指令
    public static final String UMBRELLA_WECHATAPP_COMMAND_40602="40602"; // 结束进伞指令
    public static final String UMBRELLA_WECHATAPP_COMMAND_40701="40701"; // 扫码出伞指令
    public static final String UMBRELLA_WECHATAPP_COMMAND_40702="40702"; // 结束出伞指令

    public static final String UPLOAD_FILE_PATH= "zheng.api.upload.path";


    /**
     * 伞机状态码 start ==========================
     */
    public static final Integer UM_MACHINE_STATUS_FAIL          =   1; // 故障      通信失败或签到失败，既设备故障
    public static final Integer UM_MACHINE_STATUS_UP            =   2; // 在线      签到既在线
    public static final Integer UM_MACHINE_STATUS_DOWN          =   3; // 离线      数据录入正常，准备完善是为离线状态，等待伞机签到
    public static final Integer UM_MACHINE_STATUS_OFF           =   4; // 关闭（未启用） 默认新数据录入启用
    /**
     * 伞机状态码  end   ===========================================
     */

    /**
     * 伞机MQ通讯异常状态码 start ======================================================
     */

    public static final Integer MACHINE_MQ_CONNECT_FAIL                =   0; // 故障
    public static final Integer MACHINE_MQ_CONNECT_SUCCESS            =   1; // 正常

    /**
     * 伞机MQ通讯异常状态码 end ======================================================
     */

    /**
     * 伞机执行指令反馈码 start=========================================================
     */
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_1                =   1; // 机器码不匹配
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_2                =   2; // 指令不存在
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_3                =   3; // 设备正在执行指令（工作态）
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_4                =   4; // 红外故障
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_5                =   5; // RFID故障
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_6                =   6; // RFID读取到雨伞编码
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_7                =   7; // RFID超时
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_8                =   8; // 红外超时
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_9                =   9; // 红外切断
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_10                =  10; // 进伞操作结束
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_11                =  11; // 出伞操作结束
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_12                =  12; // 感应区存在雨伞 （还伞流程）
    public static final Integer MACHINE_COMMAND_RUNBACK_STATUS_99                =  99; // 伞机运行故障
    /**
     * 伞机执行指令反馈码 end=========================================================
     */

    public static final String CHIP_NUMBER_SEPARATOR  =  ","; // 多个还伞码间隔符
}
